package logic

import (
	"net/http"
	"tiktok/models"

	"github.com/gin-gonic/gin"
)

type VideoListResponse struct {
	models.Status
	VideoList []models.Video `json:"video_list"`
}

var DemoVideos = []models.Video{
	{
		Vid:           2,
		Author:        DemoUser,
		PlayUrl:       "https://tiktok-video-1313520634.cos.ap-beijing.myqcloud.com/1675658873.mp4", //实际要从数据库读取
		CoverUrl:      "https://cdn.pixabay.com/photo/2016/03/27/18/10/bear-1283347_1280.jpg",
		FavoriteCount: 0,
		CommentCount:  0,
		IsFavorite:    false,
		Title:         "1",
	},
}

var DemoUser = models.User{
	Uid:           0,
	Name:          "1",
	FollowCount:   1,
	FollowerCount: 1,
	IsFollow:      false,
}

func Favoritelist(ctx *gin.Context) {
	ctx.JSON(http.StatusOK, VideoListResponse{
		Status: models.Status{
			StatusCode: 0,
		},
		VideoList: DemoVideos,
	})
}
